const mongoose = require('mongoose');
mongoose.set('strictQuery', true);

mongoose.connect('mongodb://47.99.138.228:27017/commerce');
 




let conn = mongoose.connection;


conn.on('open', () => {
    console.log('数据库连接成功');
})

conn.on('error', (err) => { 
    console.log('数据库连接失败',err);
})

module.exports = mongoose;